package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.RecoveryCategoryMapper;
import com.ruoyi.system.domain.RecoveryCategory;
import com.ruoyi.system.service.IRecoveryCategoryService;
import com.ruoyi.common.core.text.Convert;

/**
 * 回收品类 服务层实现
 * 
 * @author ruoyi
 * @date 2019-08-07
 */
@Service
public class RecoveryCategoryServiceImpl implements IRecoveryCategoryService 
{
	@Autowired
	private RecoveryCategoryMapper recoveryCategoryMapper;

	/**
     * 查询回收品类信息
     * 
     * @param id 回收品类ID
     * @return 回收品类信息
     */
    @Override
	public RecoveryCategory selectRecoveryCategoryById(Long id)
	{
	    return recoveryCategoryMapper.selectRecoveryCategoryById(id);
	}
	
	/**
     * 查询回收品类列表
     * 
     * @param recoveryCategory 回收品类信息
     * @return 回收品类集合
     */
	@Override
	public List<RecoveryCategory> selectRecoveryCategoryList(RecoveryCategory recoveryCategory)
	{
	    return recoveryCategoryMapper.selectRecoveryCategoryList(recoveryCategory);
	}
	
    /**
     * 新增回收品类
     * 
     * @param recoveryCategory 回收品类信息
     * @return 结果
     */
	@Override
	public int insertRecoveryCategory(RecoveryCategory recoveryCategory)
	{
	    return recoveryCategoryMapper.insertRecoveryCategory(recoveryCategory);
	}
	
	/**
     * 修改回收品类
     * 
     * @param recoveryCategory 回收品类信息
     * @return 结果
     */
	@Override
	public int updateRecoveryCategory(RecoveryCategory recoveryCategory)
	{
	    return recoveryCategoryMapper.updateRecoveryCategory(recoveryCategory);
	}

	/**
     * 删除回收品类对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteRecoveryCategoryByIds(String ids)
	{
		return recoveryCategoryMapper.deleteRecoveryCategoryByIds(Convert.toStrArray(ids));
	}
	
}
